package com.ruoyi.system.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 订单管理对象 sys_commodity_order
 *
 * @author ruoyi
 * @date 2022-02-19
 */

public class SysCommodityOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 下单人
     */
    private String orderPlacer ;

    /**
     * 超时时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date timeout ;

    /**
     * 订单id
     */
    @Excel(name = "订单id")
    private Long orderId;

    /**
     * 订单设置
     */
    @Excel(name = "订单设置", width = 30, dateFormat = "yyyy-MM-dd")
    private Long orderSettingId;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userId;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long commodityId;

    @Excel(name = "1: 秒杀订单; 2:正常订单")
    private Long orderType;
    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String commodityName;

    /**
     * 1: 未支付; 2:已支付; 3:已过期; 4:已发货; 5:已确认收货; 6:已评价
     */
    @Excel(name = "1: 未支付; 2:已支付; 3:已过期; 4:已发货; 5:已确认收货; 6:已评价")
    private String orderStatus;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderPlacer() {
        return orderPlacer;
    }

    public void setOrderPlacer(String orderPlacer) {
        this.orderPlacer = orderPlacer;
    }

    public Date getTimeout() {
        return timeout;
    }

    public void setTimeout(Date timeout) {
        this.timeout = timeout;
    }

    public Long getOrderType() {
        return orderType;
    }

    public void setOrderType(Long orderType) {
        this.orderType = orderType;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderSettingId(Long orderSettingId) {
        this.orderSettingId = orderSettingId;
    }

    public Long getOrderSettingId() {
        return orderSettingId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setCommodityId(Long commodityId) {
        this.commodityId = commodityId;
    }

    public Long getCommodityId() {
        return commodityId;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderId", getOrderId())
                .append("orderSettingId", getOrderSettingId())
                .append("userId", getUserId())
                .append("commodityId", getCommodityId())
                .append("commodityName", getCommodityName())
                .append("orderStatus", getOrderStatus())
                .append("createTime", getCreateTime())
                .toString();
    }
}
